In this document, we discuss the solution of a simple one-dimensional solid mechanics problem, using oomph-lib's
Kirchhoff-Love beam elements:
Determine the deformation of a pre-stressed, pressure-loaded elastic beam of length ![]()
A pre-stressed elastic beam under constant pressure loading. |
oomph-lib's
beam elements are based on geometrically nonlinear Kirchhoff-Love beam theory with incrementally linear constitutive equations (Young's modulus
and
The beam's undeformed shape is parametrised by a non-dimensional Lagrangian coordinate
The non-dimensional form of the principle of virtual displacements that governs the beams deformation is then given by
where
and
represent the squares of the lengths of infinitesimal material line elements in the undeformed and the deformed configurations, respectively.
We represent the curvature of the beam's centreline before and after the deformation by
and
respectively. The ("1x1") strain and and bending "tensors"
Finally,
is the ratio of the natural timescale of the beam's in-plane extensional oscillations,
to the timescale
oomph-lib's
HermiteBeamElement
provides a discretisation of the variational principle (1) with one-dimensional, isoparametric, two-node Hermite solid mechanics elements. In these elements, the Eulerian positions of the nodes, accessible via Node::x(...)
, are regarded as unknowns, and Hermite interpolation is used to interpolate the position between the nodes, so that the Eulerian position of material points within an element is given by
where
They have the property that
The mapping (2) therefore provide an independent interpolation for the position and its derivative with respect to the local coordinate
This representation ensures the
The two "types" of "generalised" positional degrees of freedom are accessible via the function Node::x_gen(k,i)
, where Node::x_gen(0,i)
Node::x(i)
. The two types of positional degrees of freedom correspond to the two types of boundary conditions (pinned and clamped) that can be applied at the ends of the beam. Mathematically, the number of boundary conditions reflects the fact that the Euler-Lagrange equations of the variational principle are of fourth-order.
The nodes of solid mechanics elements are SolidNodes
, a generalisation of the basic Node
class that allows the nodal positions to be treated as unknowns. Its member function SolidNode::pin_position(...)
allows the application of boundary conditions for the (generalised) nodal positions. The table below lists several common boundary conditions and their application:
Boundary condition | Mathematical condition | Implementation |
Pinned: ![]() | ![]() ![]() | SolidNode::pin_position(0) ;SolidNode::pin_position(1) ; or, equivalently, SolidNode::pin_position(0,0) ;SolidNode::pin_position(0,1) ; |
Pinned, sliding in the x-direction: ![]() | ![]() | SolidNode::pin_position(1) ; or, equivalently, SolidNode::pin_position(0,1) ; |
Pinned, sliding in the y-direction: ![]() | ![]() | SolidNode::pin_position(0) ; or, equivalently, SolidNode::pin_position(0,0) ; |
Clamped: ![]() | ![]() ![]() ![]() | SolidNode::pin_position(0) ; SolidNode::pin_position(1) ; SolidNode::pin_position(1,1) ; or, equivalently, SolidNode::pin_position(0,0) ; SolidNode::pin_position(0,1) ; SolidNode::pin_position(1,1) ; |
Clamped, sliding in the y-direction (symmetry boundary condition!) ![]() | ![]() ![]() | SolidNode::pin_position(0) ; SolidNode::pin_position(1,1) ; or, equivalently, SolidNode::pin_position(0,0) ; SolidNode::pin_position(1,1) ; |
The HermiteBeamElement
provides default values for all non-dimensional physical parameters:
These values can be over-written via suitable access functions. [Time-dependent computations also require the specification of a timestepper for the elements. This is demonstrated in another example.] The "user" must specify:
GeomObject
– see the earlier example for a discussion of oomph-lib's
geometric objects.The animation shown below illustrates the deformation of the beam under increasing pressure. An increase in pressure initially deflects the beam vertically downwards. The pressure acts as a "follower load" since it always acts in the direction normal to the deformed beam. This causes the beam to deform into an approximately circular shape whose radius increases rapidly.
Before discussing the details of the numerical solution, we will derive an approximate analytical solution of the problem. The analytical solution will be useful to validate the computational results, and the derivation will allow us to discuss certain aspects of the theory in more detail.
We start by parametrising the beam's undeformed shape as
The 1x1 "metric tensor" associated with this parametrisation is given by
consistent with the fact that the Lagrangian coordinate
If the beam is thin (so that
(See the Exercises and Comments for a more detailed discussion of this analytical solution.) Here
This deformation generates a uniform stretch of
corresponding to a uniform strain
The incremental Hooke's law predicts a linear relation between the (2nd Piola Kirchhoff) stress,
where
An elementary force balance shows that the pressure
where
is the radius of the circular arc, and the axial tension
In this expression we have used the fact that the 2nd Piola Kirchhoff stress
The pressure required to deform the beam into a circular arc with opening angle
To facilitate comparisons with the numerical solutions, we determine the opening angle
The opening angle then follows from
Here is a comparison between the computed and analytically predicted values for the pressure
The comparison between the computational results and the analytical predictions is very satisfying but is important to realise that the agreement only validates the numerical solution, not the physical model. |
The namespace Global_Physical_Variables
contains the dimensionless beam thickness, Global_Physical_Variables::load()
which computes the load vector in the form required by the HermiteBeamElements
. (The function's arguments allow the load vector to be a function of the Lagrangian and Eulerian coordinates, and the unit normal to the deformed beam,
The main code is very short. The physical parameters
The problem class has five member functions, only two of which are non-trivial:
ElasticBeamProblem(...)
, whose arguments specify the number of elements and the beam's undeformed length.parameter_study()
, which computes the beam's deformation for a range of external pressures.In the present problem, the functions Problem::actions_before_newton_solve()
and Problem::actions_after_newton_solve()
are not required, so remain empty. The function ElasticBeamProblem::mesh_pt()
overloads the (virtual) function Problem::mesh_pt()
to return a pointer to the specific mesh used in this problem. This avoids explicit re-casts when member functions of the specific mesh need to be accessed.
The class also includes three private data members which store a pointer to a node at which the displacement is documented, the length of the domain, and a pointer to the geometric object that specifies the beam's undeformed shape.
We start by creating the undeformed centreline of the beam as a StraightLine
, one of oomph-lib's
standard geometric objects.
We then construct the a one-dimensional Lagrangian mesh in two-dimensional space, using the previously-constructed geometric object to set the initial positions of the nodes.
The OneDLagrangianMesh
is a SolidMesh
whose constituent nodes are SolidNodes
. These nodes store not only their (variable) 2D Eulerian position, accessible via SolidNode::x(...)
, but also their (fixed) 1D Lagrangian coordinates, accessible via SolidNode::xi(...)
. The OneDLagrangianMesh
constructor assigns the nodes' Lagrangian coordinate, GeomObject
pointed to by Undef_beam_pt
, provides a parametrisation of the beam's undeformed shape in the form
Next we pin the nodal positions on both boundaries
We then loop over the elements and set the pointers to the physical parameters (the pre-stress and the thickness), the function pointer to the load vector, and the pointer to the geometric object that specifies the undeformed beam shape.
We choose a node near the centre of the beam to monitor the displacements. (If the total number of nodes is even, the control node will not be located at the beam's exact centre; its vertical displacement will therefore differ from the analytical solution that we output in doc_solution(...)
– in this case we issue a suitable warning.)
Finally, we assign the equation numbers
The function ElasticBeamProblem::parameter_study() is used to perform a parameter study, computing the beam's deformation for a range of external pressures. During the solution of this particular problem, the maximum residual in the Newton iteration can be greater than the default maximum value of 10.0. We increase the default value by assigning a (much) larger value to Problem::Max_residuals
.
Next, we choose the increment in the control parameter (the external pressure), set its initial value and open an output file that will contain the value of the external pressure, the mid-point displacement and external pressure computed from the analytical solution. We also create an output stream and a string that will be used to write the complete solution for each value of the external pressure.
In the loop, we increment the external pressure
Problem
constructor. You will have to adjust the number of elements to fully resolve the bending boundary layers.oomph-lib's
defaultnonlinear solver, Problem::newton_solve(...)
, provides an implementation of the Newton method, which has the attractive feature that it converges quadratically – provided a good initial guess for the solution is available. Good initial guesses can often (usually?) be generated by computing the solution via a sequence of substeps, as in the above example where we started with a known solution (the undeformed beam – the exact solution for Problem::Max_newton_iterations
(which has a default value of 10)Problem::Max_residuals
(which has a default value of 10.0)Problem::Newton_solver_tolerance
, which has a default value of Problem
base class and can therefore be changed in any specific Problem
. For instance, in the problem considered above, the undeformed beam provides a poor approximation of its equilibrium shape at the first pressure value. The Newton method still converges (very slowly initially, then quadratically as it approaches the exact solution), even though the initial maximum residual has a relatively large value of 19.6. Here are some exercises that explore the convergence characteristics of the Newton method:pext_increment
, for which the Newton method still converges.pext_increment
, remains constant.Problem::Newton_solver_tolerance
. Is the default value A pdf version of this document is available.